# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: team/kde <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
pkgname=kmousetool
pkgver=23.08.4
pkgrel=0
# armhf blocked by extra-cmake-modules
arch="all !armhf"
url="https://kde.org/applications/utilities/org.kde.kmousetool"
pkgdesc="A program that clicks the mouse for you"
license="GPL-2.0-or-later AND GFDL-1.2-only"
makedepends="
	extra-cmake-modules
	qt5-qtbase-dev
	kdbusaddons5-dev
	kdoctools5-dev
	ki18n5-dev
	kiconthemes5-dev
	knotifications5-dev
	kxmlgui5-dev
	phonon-dev
	libxt-dev
	libxtst-dev
	samurai
	"
_repo_url="https://invent.kde.org/accessibility/kmousetool.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/kmousetool-$pkgver.tar.xz"
subpackages="$pkgname-doc $pkgname-lang"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
4b18142125f15f08d10c93941be3fc93124788cba08971c756fa1ddb036148187990a3c178dd9291573e96cd3ed16c965c257247a7f395e11f87535cb2f95067  kmousetool-23.08.4.tar.xz
"
